package com.xbs.service.selfdriving;

import java.util.List;

import com.xbs.dao.conn.ParamSet;
import com.xbs.dao.selfdriving.ModelManageDao;
import com.xbs.entity.ModelManageEntity;

/**
 * 后台车型管理业务处理类
 * @author Administrator
 *
 */
public class ModelManageService {
	
	private ModelManageDao modelManageDao;
	
	public ModelManageService(){
		modelManageDao = new ModelManageDao();
	}
	
	/**
	 * 1.查询所有车型信息
	 * @return
	 */
	public List<ModelManageEntity> selAll(){
		return modelManageDao.selAll();
	}
	
	/**
	 * 2.根据车型编号查询车型信息
	 * @return
	 */
	public List<ModelManageEntity> selAll1(String modelid){
		return modelManageDao.selAll1(modelid);
	}
	
	/**
	 * 3.添加车型信息
	 * @return
	 */
	public int insert(String id, String name, String type, String year, Integer seating, Integer number, String fuel, String gps, String seat, String image, double cash, double insurance, double discount, double pledge){
		return modelManageDao.insert(id, name, type, year, seating, number, fuel, gps, seat, image, cash, insurance, discount, pledge);
	}
	
	/**
	 * 4.根据车型编号删除车型信息
	 * @return
	 */
	public int delete(String modelid){
		return modelManageDao.delete(modelid);
	}
	
	/**
	 * 5.根据车型编号修改车型信息
	 * @return
	 */
	public int update(String id, String name, String type, String year, Integer seating, Integer number, String fuel, String gps, String seat, String image, double cash, double insurance, double discount, double pledge, String id1){
		return modelManageDao.update(id, name, type, year, seating, number, fuel, gps, seat, image, cash, insurance, discount, pledge, id1);
	}
}
